package com.xjt.query.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.xjt.query.dao.interf.LoginLogDao;
import com.xjt.query.dao.pojo.LoginLog;

public class LoginLogDaoImpl extends SqlMapClientDaoSupport implements LoginLogDao {

    public int countLoginLogList(LoginLog log) {
        Integer count = (Integer) getSqlMapClientTemplate().queryForObject("login_log.countLoginLogList", log);
        return count;
    }

    public Long insertLoginLog(LoginLog record) {
        Object newKey = getSqlMapClientTemplate().insert("login_log.insertLoginLog", record);
        return (Long) newKey;
    }

    @SuppressWarnings("unchecked")
    public List<LoginLog> queryLoginLogList(LoginLog log) {
        List<LoginLog> list = getSqlMapClientTemplate().queryForList("login_log.queryLoginLogList", log);
        return list;
    }

    @SuppressWarnings("unchecked")
    public List<LoginLog> queryLoginLogListPaging(LoginLog log) {
        List<LoginLog> list = getSqlMapClientTemplate().queryForList("login_log.queryLoginLogListPaging", log);
        return list;
    }

}
